package com.zkthink.ceres.product.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;


@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_admin_dc_member_config")
@ApiModel(value = "ProductDiscContriConfig", description = "会员买商品的折扣和贡献值分配设置")
@AllArgsConstructor
public class ProductDiscContriConfig  extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @TableField("product_id")
    @Excel(name = "商品id")
    private Long productId;


    /**
     * 买家得到的折扣的比例(%)
     */
    @ApiModelProperty(value = "买家得到的折扣的比例")
    @TableField("discount_member")
    @Excel(name = "买家得到的折扣的比例")
    private Integer discountMember;

    /**
     * 买家的直接推荐人得到的折扣的比例(%)
     */
    @ApiModelProperty(value = "买家的直接推荐人得到的折扣的比例")
    @TableField("discount_member1")
    @Excel(name = "买家的直接推荐人得到的折扣的比例")
    private Integer discountMember1;

    /**
     * 买家的服务之星得到的折扣比例(%)
     */
    @ApiModelProperty(value = "买家的服务之星得到的折扣比例")
    @TableField("discount_member2")
    @Excel(name = "买家的服务之星得到的折扣比例")
    private Integer discountMember2;

    /**
     * 平台获得的折扣的比例(%)
     */
    @ApiModelProperty(value = "平台获得的折扣的比例")
    @TableField("discount_pingtai")
    @Excel(name = "平台获得的折扣的比例")
    private Integer discountPingtai;

    /**
     * 买家得到的贡献值的比例(%)
     */
    @ApiModelProperty(value = "买家得到的贡献值的比例")
    @TableField("contribution_member")
    @Excel(name = "买家得到的贡献值的比例")
    private Integer contributionMember;

    /**
     * 买家直推人得到的贡献值得比例(%)
     */
    @ApiModelProperty(value = "买家直推人得到的贡献值得比例")
    @TableField("contribution_member2")
    @Excel(name = "买家直推人得到的贡献值得比例")
    private Integer contributionMember1;

    /**
     * 买家的服务之星得到的贡献值的比例(%)
     */
    @ApiModelProperty(value = "买家的服务之星得到的贡献值的比例")
    @TableField("contribution_member3")
    @Excel(name = "买家的服务之星得到的贡献值的比例")
    private Integer contributionMember2;



    /**
     * 商家获得的折扣比例(%)
     */
    @ApiModelProperty(value = "商家获得的折扣比例")
    @TableField("discount_tenant")
    @Excel(name = "商品折扣比例")
    private Integer discountTenant;

    /**
     * 直接分销获得的折扣比例(%)
     */
    @ApiModelProperty(value = "直接分销获得的折扣比例")
    @TableField("discount_tenant1")
    @Excel(name = "直接分销获得的折扣比例")
    private Integer discountTenant1;

    /**
     * 间接分销获得的折扣比例(%)
     */
    @ApiModelProperty(value = "间接分销获得的折扣比例")
    @TableField("discount_tenant2")
    @Excel(name = "间接分销获得的折扣比例")
    private Integer discountTenant2;

    /**
     * 资深分销获得的折扣比例(%)
     */
    @ApiModelProperty(value = "资深分销获得的折扣比例")
    @TableField("discount_tenant3")
    @Excel(name = "资深分销获得的折扣比例")
    private Integer discountTenant3;

    /**
     * 逻辑删除 1-删除 0-未删除
     */
    @ApiModelProperty(value = "逻辑删除 1-删除 0-未删除")
    @NotNull(message = "逻辑删除 1-删除 0-未删除不能为空")
    @TableField("is_delete")
    @Excel(name = "逻辑删除 1-删除 0-未删除")
    private Integer isDelete;



    @Builder
    public ProductDiscContriConfig(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime, Integer isDelete, Long productId,
                                   Integer discountMember,Integer discountMember1,Integer discountMember2,Integer discountPingtai,
                                   Integer contributionMember,Integer contributionMember1,Integer contributionMember2,
                                   Integer discountTenant,Integer discountTenant1,Integer discountTenant2,Integer discountTenant3) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.isDelete = isDelete;
        this.productId=productId;
        this.discountMember=discountMember;
        this.discountMember1=discountMember1;
        this.discountMember2=discountMember2;
        this.contributionMember=contributionMember;
        this.contributionMember1=contributionMember1;
        this.contributionMember2=contributionMember2;
        this.discountTenant=discountTenant;
        this.discountTenant1=discountTenant1;
        this.discountTenant2=discountTenant2;
        this.discountTenant3=discountTenant3;
        this.discountPingtai=discountPingtai;
    }
}
